package com.heima.article.task;

import com.heima.article.service.ApHotArticlesService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CalculateArticleScore {
    @Autowired
    private ApHotArticlesService hotArticlesService;
    @XxlJob("caicArticleScore")
    public ReturnT<String> calcArticleScore(String param){
        log.info("开始执行计算文章热度值的定时任务");

        hotArticlesService.calcArticleScore();


        return ReturnT.SUCCESS;
    }

}